The attributes listed below are supported by all HTML 5 tags.
HTML 5 global attributes
access key
Specifies shortcut key that can be used to access element.
<a href="http://www.mindstick.com/" accesskey="m">MINDSTICK</a>
class
We will use class attribute to specify css on element tag in html5.
contenteditable
Sets whether the user can edit the content or not. This is a boolean attribute. If true then user can edit content of element if false then user can not edit content of element. By default it is false.
<div contenteditable="true" style="width:300px;height:300px;overflow:auto;border:3px solid red">
</div>
contextmenu
This attribute specifies the context menu for an element in html5.
dir
This attribute specifies the direction of the text for an element in html5.
draggable
This attribute specifies that users are allowed drag element or not.
hidden
This attribute specifies whether element should visible or not. This is a Boolean attribute.
id
This attribute specifies the elements identity that should be unique. On scripting language we can access element via this id.
lang
This attribute specifies a language code for the content in an element in html5.
spellcheck
Specifies whether the element should have its spelling checked or not.
dropzone
Specifies what happens when dragged items/data is dropped in the element.
tabindex
Determine the tabbing order (when the user 'tabs' through the elements on the page).
title
Specifies extra information about an element
style
This attribute is used to apply css style on elements. We will used it as follows.
style="width:300px;height:300px;overflow:auto;border:3px solid red"
Anonymous User
17-Apr-2019Thank you for the informative post.